Test Series - java script

Test Number 72/92

Q: How many properties does a prototype object have?
A. 6
B. 7
C. 8
D. 9
Solution: The prototype is an object that is associated with every functions and objects by default in JavaScript, where function’s prototype property is accessible and modifiable and object’s prototype property (aka attribute) is not visible. There are a total of 7 properties in the prototype object namely:
perceivedTime
redirectTime
cacheTime
dnsLookupTime
tcpConnectionTime
roundTripTime
pageRenderTime.
Q: Which of the following does not serialize the undefined values or objects within an object?
A. JSON.string
B. JSON
C. JSON.stringify
D. JSON.change()
Solution: JSON.stringify does not serialize undefined values or functions within an object. JSON.stringify() converts a JavaScript object into a string.
Q: How many properties are there in the interface PerformanceTiming?
A. 21
B. 22
C. 23
D. 24
Solution: Performance.timing read-only property returns a PerformanceTiming object containing latency-related performance information. There are a total of 23 properties associated with the interface PerformanceTiming.
Q: How many properties are there in window.performance object?
A. 1
B. 2
C. 3
D. 4
Solution: The Window interface’s performance property returns a Performance object, which can be used to gather performance information about the current document. There are totally 2 properties associated with the window.performance and they are:
navigation
type.
Q: What is the purpose of the navigation property in the window.performance object?
A. To which page the user navigated
B. How the user navigated
C. Information about the page
D. Information of the curser
Solution: The navigation tells how the user navigated to the page.
Q: What is the purpose of the property PerformanceTiming.navigationStart?
A. Ready to end the navigation
B. Ready to jump the navigation
C. Ready for navigation
D. Ready to changing the navigation
Solution: The PerformanceTiming.navigationStart read-only property returns an unsigned long long representing the moment, in milliseconds since the UNIX epoch, right after the prompt for unload terminates on the previous document in the same browsing context. If there is no previous document, this value will be the same as: PerformanceTiming.fetchStart.
Q: Which of the following does JSON.stringify not serialize?
A. Undefined values
B. Functions within an object
C. Both Undefined values and Functions within an object
D. Functions outside the object
Solution: JSON.stringify does not serialize undefined values or functions within an object. JSON.stringify() converts a JavaScript object into a string.
Q: What is the purpose of the property PerformanceTiming.fetchStart?
A. Browser ready to fetch input
B. Browser ready to fetch document
C. Browser ready to fetch summary
D. Browser ready to fetch output
Solution: The PerformanceTiming.fetchStart read-only property returns an unsigned long long representing the moment, in milliseconds since the UNIX epoch, the browser is ready to fetch the document using an HTTP request. If there is no previous document, this value will be the same as PerformanceTiming.fetchStart.
Q: Which of the following property is associated with the Request event?
A. requestStart
B. requestEnd
C. both requestStart and requestEnd
D. requestchange
Solution: The Request event has only one property: requestStart. The Request event has only one property: requestStart.
Q: Which of the following API can be used to get the timing without affecting the page loading process?
A. Navigation API
B. Timing API
C. Navigation Timing API
D. Navigate API
Solution: The Navigation Timing API provides data that can be used to measure the performance of a web site. The timing code is on the page, so it affects how the page loads and the time that takes. The Navigation Timing API can be used to get the timing without affecting the page loading process.

You Have Score    /10